<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>

  <script>
    // 字符串型 使用单引号'' 或双引号"" 或反引号`` 包裹起来的内容都是字符串型
    let str1 = 'hello'
    let str2 = "hello"
    let str3 = `hello`

    // 字符串内套用 遵循外双内单 或外单内双 或使用反斜杠转义
    let str4 = 'hello "小笨蛋"'
    let str5 = "hello '小笨蛋'"
    let str6 = 'hello `小笨蛋`'
    let str7 = 'hello \'小笨蛋\''
    console.log(str7);

    // 只要是用单引号包裹的都是字符串
    let str8 = '11'
    console.log(str8);
    let num = 11
    console.log(num);

    // 字符串拼接
    console.log('你好' + '刘德华');

    console.log('你好' + str1);

    console.log('你好' + num + '岁');



  </script>
</body>

</html>